package com.yang.webapi.module.controller;

import com.yang.service.model.dto.post.ShopPostDTO;
import com.yang.service.model.vo.UserVO;
import com.yang.webapi.module.service.UserWebService;
import com.zhy.base.webapi.annoation.ResponseFormatter;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * Created by baipan
 * Date: 2019/12/23 0023
 */
@RestController
@ResponseFormatter
@RequestMapping(value = "user")
@CrossOrigin
@Slf4j
@Api(tags = "用户管理", description = "获取用户信息")
public class UserController {

    @Autowired
    UserWebService userWebService;
    @ApiOperation("获取用户的全部信息")
    @GetMapping
    public UserVO getUserInfo() {
        return userWebService.getUserInfo();
    }
}
